<%@ page language="java" contentType="text/html;charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<head>
    <jsp:include page="../common/common.jsp"/>
</head>
<body class="page-header-fixed">
<jsp:include page="../common/header.jsp"/>
<div class="clearfix">
</div>
<div class="page-container">
    <div class="page-sidebar-wrapper"><jsp:include page="../common/menu.jsp"/></div>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <form class="form-horizontal form-row-seperated" id="form" method="post" action="${path}/article/save">
                        <div class="portlet box purple">
                            <div class="portlet-title">
                                <div class="caption">
                                    <i class="fa fa-shopping-cart"></i>投稿详细内容
                                </div>
                                <div class="actions btn-set">
                                    <a href="javascript:history.go(-1);" class="btn default"><i
                                            class="fa fa-angle-left"></i> 返回</a>
                                    <button type="button" onclick="save()" class="btn blue"><i class="fa fa-check"></i> 保存
                                    </button>
                                </div>
                            </div>
                            <div class="portlet-body">
                                <div class="tabbable">
                                    <div class="tab-content no-space">
                                        <div class="tab-pane active" id="tab_general">
                                            <div class="form-body">
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">栏目:
                                                    </label>
												
                                                    <div class="col-md-3">
                                                     
														      <c:choose>
														       <c:when test="${fn:contains(st,user.username)==true}">
														                	 <select id="pid" class="form-control" name="pid">
															                	  <c:forEach items="${column}" var="s">
						                                                            <c:if test="${s.id==9738 || s.id==9920|| s.id==9921|| s.id==9922|| s.id==9923|| s.id==9924|| s.id==9926 || s.id==9925 || s.id==9790}">
						                                                                <option value="${s.id}"
						                                                                <c:if test="${data.cv.pid==0}">
						                                                                        <c:if test="${data.cv.id == s.id}">selected</c:if> >${s.value0}</option></c:if>
						                                                                <c:if test="${data.cv.pid!=0}">
						                                                                        <c:if test="${data.cv.pid == s.id}">selected</c:if> >${s.value0}</option></c:if>
						                                                            	</c:if>
						                                                            </c:forEach>
					                                                        </select>
														       </c:when>
														       <c:when test="${user.username=='zhddk'}">
														                	 <select id="pid" class="form-control" name="pid">
															                	  <c:forEach items="${column}" var="s">
						                                                            <c:if test="${s.id==9760 }">
						                                                                <option value="${s.id}"
						                                                                <c:if test="${data.cv.pid==0}">
						                                                                        <c:if test="${data.cv.id == s.id}">selected</c:if> >${s.value0}</option></c:if>
						                                                                <c:if test="${data.cv.pid!=0}">
						                                                                        <c:if test="${data.cv.pid == s.id}">selected</c:if> >${s.value0}</option></c:if>
						                                                            	</c:if>
						                                                            </c:forEach>
					                                                        </select>
														       </c:when>
														       <c:when test="${user.username=='jymsk'}">
														                	 <select id="pid" class="form-control" name="pid">
															                	  <c:forEach items="${column}" var="s">
						                                                            <c:if test="${s.id==9670 || s.id==9802 || s.id==9672 || s.id==9665 || s.id==9736 || s.id==9737 || s.id==9759|| s.id==9916 || s.id==9917}">
						                                                                <option value="${s.id}"
						                                                                <c:if test="${data.cv.pid==0}">
						                                                                        <c:if test="${data.cv.id == s.id}">selected</c:if> >${s.value0}</option></c:if>
						                                                                <c:if test="${data.cv.pid!=0}">
						                                                                        <c:if test="${data.cv.pid == s.id}">selected</c:if> >${s.value0}</option></c:if>
						                                                            	</c:if>
						                                                            </c:forEach>
					                                                        </select>
														       </c:when>
														       <c:otherwise>
																		   <select id="pid" class="form-control" name="pid">
					                                                            <c:forEach items="${column}" var="s">
					                                                            <c:if test="${s.id!=9678 && s.id!=9739 && s.id!=9734 && s.id!=9735 && s.id!=9986 && s.id!=9801 && s.id!=10167}">
					                                                                <option value="${s.id}"
					                                                                <c:if test="${data.cv.pid==0}">
					                                                                        <c:if test="${data.cv.id == s.id}">selected</c:if> >${s.value0}</option></c:if>
					                                                                <c:if test="${data.cv.pid!=0}">
					                                                                        <c:if test="${data.cv.pid == s.id}">selected</c:if> >${s.value0}</option></c:if>
					                                                            	</c:if>
					                                                            </c:forEach>
					                                                        </select>
														       </c:otherwise>
														</c:choose>
                                                    </div>
                                                    <div class="col-md-2">
                                                        <select id="columnId" name="columnId" class="form-control"></select>
                                                    </div>
                                                </div>
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">单位:
                                                        <span class="required">*</span>
                                                    </label>
<!--                                                     <style type="text/css">  -->
<!-- </style>  -->
<script type="text/javascript">
var cnt = 46;
var radiostate = 0;
function radioclick(a){
    if (radiostate == 1){
        document.getElementById('raid'+a).checked = false;
        radiostate = 0;
    }else{
        document.getElementById('raid'+a).checked = true;
        radiostate = 1;
    }   
}

</script>
                                                    <div class="col-md-3" style="width:620px;">
                                                     <div style="float:left;">
                                                    	<span style="float:left;color:red;font-size:16px;">局直科室：</span>
                                                    	<div style="float:left;margin-left:60px;">
	                                                    	<label><input type="radio" id="raid1" onclick="radioclick(1);" name="departments[0]" value="zhddk" <c:if test="${data.departments[0]=='zhddk'}">checked="true"</c:if>>指挥调度科</label>
	                                                    	<label><input type="radio" id="raid2" onclick="radioclick(2);" name="departments[1]" value="jymsk" <c:if test="${data.departments[1]=='jymsk'}">checked="true"</c:if>>机要秘书科</label>
	                                                    	<label><input type="radio" id="raid3" onclick="radioclick(3);" name="departments[2]" value="kjxxk" <c:if test="${data.departments[2]=='kjxxk'}">checked="true"</c:if>>科技信息科</label>
	                                                    	<label><input type="radio" id="raid4" onclick="radioclick(4);" name="departments[3]" value="zhk" <c:if test="${data.departments[3]=='zhk'}">checked="true"</c:if>>综合科</label>
	                                                    	<label><input type="radio" id="raid5" onclick="radioclick(5);" name="departments[4]" value="gbk" <c:if test="${data.departments[4]=='gbk'}">checked="true"</c:if>>干部科</label>
	                                                    	<label><input type="radio" id="raid6" onclick="radioclick(6);" name="departments[5]" value="xjk" <c:if test="${data.departments[5]=='xjk'}">checked="true"</c:if>>宣教科</label>
	                                                    	<label><input type="radio" id="raid7" onclick="radioclick(7);" name="departments[6]" value="lgk" <c:if test="${data.departments[6]=='lgk'}">checked="true"</c:if>>老干科</label>
	                                                    	<label><input type="radio" id="raid8" onclick="radioclick(8);" name="departments[7]" value="pxjd" <c:if test="${data.departments[7]=='pxjd'}">checked="true"</c:if>>培训基地</label>
	                                                    	<label><input type="radio" id="raid9" onclick="radioclick(9);" name="departments[8]" value="sjjck" <c:if test="${data.departments[8]=='sjjck'}">checked="true"</c:if>>审计监察科</label>
	                                                    	<label><input type="radio" id="raid10" onclick="radioclick(10);" name="departments[9]" value="kgssk" <c:if test="${data.departments[9]=='kgssk'}">checked="true"</c:if>>控告申诉科</label>
	                                                    	<label><input type="radio" id="raid11" onclick="radioclick(11);" name="departments[10]" value="jwbzb" <c:if test="${data.departments[10]=='jwbzb'}">checked="true"</c:if>>警务保障部</label>
	                                                    	<label><input type="radio" id="raid12" onclick="radioclick(12);" name="departments[11]" value="crjglk" <c:if test="${data.departments[11]=='crjglk'}">checked="true"</c:if>>出入境管理支队</label>
	                                                    	<label><input type="radio" id="raid13" onclick="radioclick(13);" name="departments[12]" value="jw" <c:if test="${data.departments[12]=='jvw'}">checked="true"</c:if>>纪委</label>
	                                                    	<label><input type="radio" id="raid14" onclick="radioclick(14);" name="departments[13]" value="jgdw" <c:if test="${data.departments[13]=='jgdw'}">checked="true"</c:if>>机关党委</label>
                                                        </div>
                                                     </div>
                                                     
                                                     <div style="float:left;">
                                                    	<span style="float:left;color:red;font-size:16px;">直属支队分局：</span>
                                                    	<div style="float:left;margin-left:60px;">
	                                                    	<label><input type="radio" id="raid15" onclick="radioclick(15);" name="departments[14]" value="gbzd" <c:if test="${data.departments[14]=='gbzd'}">checked="true"</c:if>>国保支队</label>
	                                                    	<label><input type="radio" id="raid16" onclick="radioclick(16);" name="departments[15]" value="fkzd" <c:if test="${data.departments[15]=='fkzd'}">checked="true"</c:if>>反恐支队</label>
	                                                    	<label><input type="radio" id="raid17" onclick="radioclick(17);" name="departments[16]" value="jzzd" <c:if test="${data.departments[16]=='jzzd'}">checked="true"</c:if>>经侦支队</label>
	                                                    	<label><input type="radio" id="raid18" onclick="radioclick(18);" name="departments[17]" value="zazd" <c:if test="${data.departments[17]=='zazd'}">checked="true"</c:if>>治安内保支队（食药侦支队）</label>
	                                                    	<label><input type="radio" id="raid19" onclick="radioclick(19);" name="departments[18]" value="xzzd" <c:if test="${data.departments[18]=='xzzd'}">checked="true"</c:if>>刑侦支队</label>
	                                                    	<label><input type="radio" id="raid20" onclick="radioclick(20);" name="departments[19]" value="jgzd" <c:if test="${data.departments[19]=='jgzd'}">checked="true"</c:if>>监管支队</label>
	                                                    	<label><input type="radio" id="raid21" onclick="radioclick(21);" name="departments[20]" value="xjzd" <c:if test="${data.departments[20]=='xjzd'}">checked="true"</c:if>>巡警支队</label>
	                                                    	<label><input type="radio" id="raid22" onclick="radioclick(22);" name="departments[21]" value="jszczd" <c:if test="${data.departments[21]=='jszczd'}">checked="true"</c:if>>技侦支队</label>
	                                                    	<label><input type="radio" id="raid23" onclick="radioclick(23);" name="departments[22]" value="jdzd" <c:if test="${data.departments[22]=='jdzd'}">checked="true"</c:if>>禁毒支队</label>
	                                                    	<label><input type="radio" id="raid24" onclick="radioclick(24);" name="departments[23]" value="jjzd" <c:if test="${data.departments[23]=='jjzd'}">checked="true"</c:if>>交警支队</label>
	                                                    	<label><input type="radio" id="raid25" onclick="radioclick(25);" name="departments[24]" value="gsjjzd" <c:if test="${data.departments[24]=='gsjjzd'}">checked="true"</c:if>>高警支队</label>
	                                                    	<label><input type="radio" id="raid26" onclick="radioclick(26);" name="departments[25]" value="wazd" <c:if test="${data.departments[25]=='wazd'}">checked="true"</c:if>>网安支队</label>
	                                                    	<label><input type="radio" id="raid27" onclick="radioclick(27);" name="departments[26]" value="tjzd" <c:if test="${data.departments[26]=='tjzd'}">checked="true"</c:if>>特警支队</label>
	                                                    	<label><input type="radio" id="raid28" onclick="radioclick(28);" name="departments[27]" value="fzzd" <c:if test="${data.departments[27]=='fzzd'}">checked="true"</c:if>>法制支队</label>
	                                                    	<label><input type="radio" id="raid29" onclick="radioclick(29);" name="departments[28]" value="jwdczd" <c:if test="${data.departments[28]=='jwdczd'}">checked="true"</c:if>>警务督察支队</label>
	                                                    	<label><input type="radio" id="raid30" onclick="radioclick(30);" name="departments[29]" value="xfzd" <c:if test="${data.departments[29]=='xfzd'}">checked="true"</c:if>>消防支队</label>
	                                                    	<label><input type="radio" id="raid31" onclick="radioclick(31);" name="departments[30]" value="jwc" <c:if test="${data.departments[30]=='jwc'}">checked="true"</c:if>>警卫处</label>
	                                                    	<label><input type="radio" id="raid32" onclick="radioclick(32);" name="departments[31]" value="cggjfj" <c:if test="${data.departments[31]=='cggjfj'}">checked="true"</c:if>>城管公交分局</label>
	                                                    	<label><input type="radio" id="raid33" onclick="radioclick(33);" name="departments[32]" value="jcfj" <c:if test="${data.departments[32]=='jcfj'}">checked="true"</c:if>>机场分局</label>
                                                      	</div>
                                                     </div>
                                                     
                                                     <div style="float:left;">
                                                    	<span style="float:left;color:red;font-size:16px;">城区分局：</span>
                                                    	<div style="float:left;margin-left:60px;">
	                                                    	<label><input type="radio" id="raid34" onclick="radioclick(34);" name="departments[33]" value="xcfj" <c:if test="${data.departments[33]=='xcfj'}">checked="true"</c:if>>襄城分局</label>
	                                                    	<label><input type="radio" id="raid35" onclick="radioclick(35);" name="departments[34]" value="fcfj" <c:if test="${data.departments[34]=='fcfj'}">checked="true"</c:if>>樊城分局</label>
	                                                    	<label><input type="radio" id="raid36" onclick="radioclick(36);" name="departments[35]" value="gxfj" <c:if test="${data.departments[35]=='gxfj'}">checked="true"</c:if>>高新分局</label>
	                                                    	<label><input type="radio" id="raid37" onclick="radioclick(37);" name="departments[36]" value="xdfj" <c:if test="${data.departments[36]=='xdfj'}">checked="true"</c:if>>襄东分局</label>
	                                                    	<label><input type="radio" id="raid38" onclick="radioclick(38);" name="departments[37]" value="djxqfj" <c:if test="${data.departments[37]=='djxqfj'}">checked="true"</c:if>>东津新区分局</label>
	                                                    	<label><input type="radio" id="raid39" onclick="radioclick(39);" name="departments[38]" value="ylzfj" <c:if test="${data.departments[38]=='ylzfj'}">checked="true"</c:if>>鱼梁洲分局（重点工程分局）</label>
                                                      	</div>
                                                     </div>
                                                     
                                                     <div style="float:left;">
                                                    	<span style="float:left;color:red;font-size:16px;">县市区分局：</span>
                                                    	<div style="float:left;margin-left:60px;">
	                                                    	<label><input type="radio" id="raid40" onclick="radioclick(40);" name="departments[39]" value="xzgafj" <c:if test="${data.departments[39]=='xzgafj'}">checked="true"</c:if>>襄州公安分局</label>
	                                                    	<label><input type="radio" id="raid41" onclick="radioclick(41);" name="departments[40]" value="zysgaj" <c:if test="${data.departments[40]=='zysgaj'}">checked="true"</c:if>>枣阳市公安分局</label>
	                                                    	<label><input type="radio" id="raid42" onclick="radioclick(42);" name="departments[41]" value="ycsgaj" <c:if test="${data.departments[41]=='ycsgaj'}">checked="true"</c:if>>宜城市公安局</label>
	                                                    	<label><input type="radio" id="raid43" onclick="radioclick(43);" name="departments[42]" value="lhksgaj" <c:if test="${data.departments[42]=='lhksgaj'}">checked="true"</c:if>>老河口市公安局</label>
	                                                    	<label><input type="radio" id="raid44" onclick="radioclick(44);" name="departments[43]" value="nzxgaj" <c:if test="${data.departments[43]=='nzxgaj'}">checked="true"</c:if>>南漳县公安局</label>
	                                                    	<label><input type="radio" id="raid45" onclick="radioclick(45);" name="departments[44]" value="bkxgaj" <c:if test="${data.departments[44]=='bkxgaj'}">checked="true"</c:if>>保康县公安局</label>
	                                                    	<label><input type="radio" id="raid46" onclick="radioclick(46);" name="departments[45]" value="gcxgaj" <c:if test="${data.departments[45]=='gcxgaj'}">checked="true"</c:if>>谷城县公安局</label>
                                                      	</div>
                                                     </div>
                                                    </div>
                                                </div>
                                                
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">标题:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input type="text" id="title" name="title"
                                                               class="form-control measure-input" 
                                                               value="${data.title}"/>
                                                    </div>
                                                    <div class="col-md-5">
                                                        &nbsp;可输入<b><span id="title_len">80</span></b> 个字符
                                                    </div>
                                                </div>
                                                
                                                <%-- <div class="form-group">
                                                    <label class="col-md-2 control-label">单位:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input type="text" id="username" name="username"
                                                               class="form-control measure-input"
                                                               value="${data.username}"/>
                                                    </div>
                                                </div>
                                                 --%>
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">公开属性:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <select name="openStatus" class="form-control">
                                       						<option value="7" <c:if test="${7== data.openStatus }">selected="selected" </c:if>>不予公开</option>
                                                        	<option value="5" <c:if test="${5== data.openStatus }">selected="selected" </c:if>>主动公开</option>
                                       						<option value="6" <c:if test="${6== data.openStatus }">selected="selected" </c:if>>依申请公开</option>
                                                        </select>
                                                    </div>
                                                </div>
                                                
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">审核:
                                                        <span class="required">*</span>
                                                    </label>
                                                    <div class="col-md-3">
                                                        <select name="status" class="form-control">
                                                        	<option value="2" <c:if test="${2== data.status }">selected="selected" </c:if> >审核不通过</option>
                                                            <option value="1" <c:if test="${1== data.status }">selected="selected" </c:if> >审核通过</option>
                                                            <option value="0" <c:if test="${0== data.status }">selected="selected" </c:if> >未审核</option>
                                                        </select>
                                                    </div>
                                                </div>

												<div class="form-group">
                                                    <label class="col-md-2 control-label">发布时间:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input id="falseCreateTime" name="falseCreateTime" type="text"
                                                               class="form-control tags medium"
                                                               value="${fn:substring(data.falseCreateTime,0,19)}"/>
                                                    </div>
                                                </div>
                                                 <div class="form-group">
                                                    <label class="col-md-2 control-label">简报编号:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input id="bulletinID" name="bulletinID" type="text"
                                                               class="form-control tags medium"
                                                               value="${data.bulletinID}"/>
                                                    </div>
                                                </div>
                                            <div class="form-group">
                                                    <label class="col-md-2 control-label">简报签发人:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input id="isSigned" name="isSigned" type="text"
                                                               class="form-control tags medium"
                                                               value="${data.isSigned}"/>
                                                    </div>
                                                </div>
                                            <div class="form-group">
                                                    <label class="col-md-2 control-label">简报核稿人:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input id="isChecked" name="isChecked" type="text"
                                                               class="form-control tags medium"
                                                               value="${data.isChecked}"/>
                                                    </div>
                                                </div>
                                            <div class="form-group">
                                                    <label class="col-md-2 control-label">简报承办人:
                                                    </label>

                                                    <div class="col-md-5">
                                                        <input id="isHeld" name="isHeld" type="text"
                                                               class="form-control tags medium"
                                                               value="${data.isHeld}"/>
                                                    </div>
                                                </div>
                                                <input type="hidden" id="imgUrl" name="imgUrl" class="form-control"
                                                       value="${data.imgUrl}"/>
                                                
                                                <%-- <c:if test="${data.columnId==9986 || data.columnId==9920 || data.columnId==9921 || data.columnId==9922 }"> --%>
                                                <div class="form-group">
                                                <label class="col-md-2 control-label">封面：</label>

                                                <div class="col-md-8">
                                                    <div class="fileinput fileinput-new" data-provides="fileinput">
                                                        <div class="fileinput-new thumbnail" style="width: 300px; height: 150px;">
                                                            <img src="${data.imgUrl}">
                                                        </div>
                                                        <div class="fileinput-preview fileinput-exists thumbnail"
                                                             style="max-width: 300px; max-height: 150px;">
                                                        </div>
                                                        <div>
                                                            <span class="btn default btn-file">
                                                                <span class="fileinput-new">
                                                                     选择图片
                                                                </span>
                                                                <span class="fileinput-exists">
                                                                     修改图片
                                                                </span>
                                                                <input type="file" id="file" name="file"/>
                                                            </span>
                                                            <a href="#" class="btn default fileinput-exists"
                                                               data-dismiss="fileinput">
                                                                移除图片
                                                            </a>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                            
                                                <div class="form-group">
                                                    <label class="col-md-2 control-label">内容:
                                                    </label>

                                                    <div class="col-md-8">
                                                        <input id="context" type="hidden" name="context">
                                                        <script id="editor" type="text/plain"
                                                                style="height:500px;">${data.context}</script>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="portlet-title">
                                <div class="actions btn-set">
                                    <a href="javascript:history.go(-1);" class="btn default"><i
                                            class="fa fa-angle-left"></i> 返回</a>
                                    <button type="button" onclick="save()" class="btn blue"><i class="fa fa-check"></i> 保存
                                    </button>
                                </div>
                            </div>
                        </div>
                        <input type="hidden" id="id" name="id" value="${data.id}">
                         <input type="hidden" name="topTime"  id="topTime"  value="${data.topTime==null?0:data.topTime}"  /> 
                        <input type="hidden" name="isNews"  id="isNews"  value="${data.isNews='1'}"  />
                        <input type="hidden" name="isarticle"  id="isarticle"  value="${data.isarticle}"  />  
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="../common/footer.jsp"/>
<script type="text/javascript" src="${path}/assets/plugins/bootstrap-fileinput/bootstrap-fileinput.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/jquery-inputmask/jquery.inputmask.bundle.min.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/jquery.input-ip-address-control-1.0.min.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/jquery.pwstrength.bootstrap/src/pwstrength.js"></script>
<script type="text/javascript" src="${path}/assets/scripts/biz/ajaxfileupload.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/ueditor/lang/zh-cn/zh-cn.js"></script>
<script type="text/javascript" src="${path}/assets/plugins/district/linkagesel-min.js"></script>

<script>
    var operType = '${operType}';
    var editor, form;
    $(function () {
        $('#pid').change(function() {
            changeSecondType(this.value);
        });
        changeSecondType($('#pid').val());
        function changeSecondType(pid) {
            $.ajax({
                url: _path + '/conf/queryConfTByPid?pid='+pid,
                type: 'GET',
                success: function(resp) {
                    $("#columnId").html('');
                    new LinkageSel({
                        dataReader: {id: 'id', name: 'value0'},
                        data: resp.dataList,
                        selStyle: 'margin-left: 3px;',
                        select:  '#columnId',
                        defVal: ['${data.columnId}']
                    });
                }
            });
        }

        UE.getEditor('editor');
        form = $("form").Validform({
            tiptype: function (msg, o, cssctl) {
                //msg：提示信息;
                //o:{obj:*,type:*,curform:*}, obj指向的是当前验证的表单元素（或表单对象），type指示提示的状态，值为1、2、3、4， 1：正在检测/提交数据，2：通过验证，3：验证失败，4：提示ignore状态, curform为当前form对象;
                //cssctl:内置的提示信息样式控制函数，该函数需传入两个参数：显示提示信息的对象 和 当前提示的状态（既形参o中的type）;
                if (!o.obj.is("form")) {//验证表单元素时o.obj为该表单元素，全部验证通过提交表单时o.obj为该表单对象;
                    var objtip = o.obj.siblings(".Validform_checktip");
                    cssctl(objtip, o.type);
                    objtip.text(msg);
                } else {
                    var objtip = o.obj.find("#msgdemo");
                    cssctl(objtip, o.type);
                    objtip.text(msg);
                }
            },
            postonce: true,
            showAllError: true,
            callback: function () {
                save();
            }
        });
    });
    function save() {
        var context = UE.getEditor('editor').getContent();
        if (!/[\w\W]+/.test(context)) {
            alert("内容不能为空");
            return;
        }
        $("#context").val(context);
	    $("#form").submit();
    }
</script>
</body>
</html>